//
//  main.m
//  OC3_继承与初始化方法
//
//  Created by 徐国庆 on 14-11-3.
//  Copyright (c) 2014年 lanou3g.com 蓝鸥科技. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "RegularZombies.h"
#import "BucketZomibe.h"
#import "DrumZomibe.h"

int main(int argc, const char * argv[])
{

    ////////////////////////////////////////////////////////////////////
    //        OC3_继承与初始化方法    作业    第一题
    // 基于昨天的作业2,将3个僵⼫尸类使⽤用继承重新定义。使⽤用完整的初始化⽅方法。定义并实现便利构造器⽅方法。
    
    RegularZombies *regularZombies = [RegularZombies regularZombiesWithtotalVolumeOfZombie:50 zombieEveryBloodLoss:3];

    for (int i = 0; i < 17; i ++) {
        [regularZombies beAgainstBloodLoss];
        if ([regularZombies totalVolumeOfZombie] <= 0) {
            [regularZombies death];
        }
    }
    BucketZomibe *bucketZomibe = [BucketZomibe regularZombiesWithtotalVolumeOfZombie:80 zombieEveryBloodLoss:2 prop:@"hat" weakness:nil];
    for (int i = 0; i< 40; i ++) {
        [bucketZomibe beAgainstBloodLoss];
        if ([bucketZomibe totalVolumeOfZombie] <= 0) {
            [bucketZomibe death];
        }
    }
    DrumZomibe *drunZomibe = [DrumZomibe drumZomibeWithtotalVolumeOfZombie:120 zombieEveryBloodLoss:1 prop:@"drum" weakness:nil];
    for (int i = 0; i < 120; i ++) {
        [drunZomibe beAgainstBloodLoss];
        if ([drunZomibe totalVolumeOfZombie] <= 0) {
            [drunZomibe death];
        }
    }
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    return 0;
}

